package com.demo.util;

public class CalcuUtils {

    public static double calcuCredit(int mark,double credit)
    {
        double result = 0;

        if( mark < 60 ){
            result = 0;
        }else if( mark >= 60 && mark<62){
            result = credit/4;
        }else if(mark >=62 &&mark<65){
            result = credit*1.7/4;
        }else if(mark >= 65 && mark < 67){
            result = credit*0.5;
        }else if(mark >=67 && mark < 70){
            result = credit * 2.3 / 4 ;
        }else if (mark >= 70 && mark <75){
            result = credit * 2.7 /4;
        }else if (mark >=75 && mark < 80){
            result = credit *3.0/4;
        }else if(mark >= 80 && mark < 85){
            result = credit *3.3/4;
        }else if (mark >=85 && mark <90){
            result = credit * 3.7/4;
        }else if(mark <= 100){
            result = credit;
        }

        return result;
    }

}
